package com.zhangyujun.bysj.common.exception;

import com.zhangyujun.bysj.model.vo.common.ResultCodeEnum;
import lombok.Data;

//自定义异常类
@Data
public class GuiguException extends RuntimeException{
    private Integer code;
    private String message;
    private ResultCodeEnum resultCodeEnum;
    public GuiguException(ResultCodeEnum resultCodeEnum) {
        this.code = resultCodeEnum.getCode();
        this.message = resultCodeEnum.getMessage();
        this.resultCodeEnum = resultCodeEnum;
    }
}
